﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Taxi_taxi.ViewModels
{
    public class MenuViewModel
    {
        public MenuViewModel()
        {
            Menu = new ObservableCollection<Menu>();
            Menu.Add(new Menu() { ID = 1, Ten = "Tìm Taxi", Image = "/Images/Image/taxi.png" });
            Menu.Add(new Menu() { ID = 2, Ten = "Tìm Đường", Image = "/Images/Image/taxi.png" });
            Menu.Add(new Menu() { ID = 3, Ten = "Bản giá", Image = "/Images/Image/taxi.png" });
            Menu.Add(new Menu() { ID = 4, Ten = "Địa điểm", Image = "/Images/Image/taxi.png" });
        }
        private ObservableCollection<Menu> _menu;
        public ObservableCollection<Menu> Menu
        {
            get { return _menu; }
            set
            {
                _menu = value;
                NotifyPropertyChanged("Menu");
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        public void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
    public class Menu
    {
        public int ID { get; set; }
        public string Ten { get; set; }
        public string Image { get; set; }
    }   
}
